# Make sure you have git-lfs installed (https://git-lfs.com)
model_dir="/models/.cache"
model_path="${model_dir}/pp-matting/models/ppmatting-512.pdparams"

if [ -e "$model_path" ]; then
    echo "模型已存在";
    exit 0;
else
    apt install -y git-lfs;
    git lfs install;
    mkdir -p $model_dir
    cd $model_dir && git clone https://huggingface.co/lijiacai/pp-matting;
    cd $model_dir/pp-matting && git lfs pull
    echo "模型下载成功";
fi


